<%@ page import="com.wuming.house.security.SecurityHander" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/3/20
  Time: 18:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>回复评论</title>
    <link rel="stylesheet" href="${allServerPath}static/layui/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${allServerPath}static/layui/css/public.css" media="all"/>
    <!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css">-->
    <!--<link rel="stylesheet" href="bootstrap-select-master/dist/css/bootstrap-select.css">-->
    <script type="text/javascript" src="${allServerPath}static/layui/layui/layui.js"></script>
</head>
<body style="background-color: #f0f2f5;" class="childrenBody">
<div class="layui-fluid wuli-main">
    <div class="layui-row">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>回复评论</legend>
        </fieldset>
        <form class="layui-form">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label" >回复内容</label>

                    <div class="layui-input-inline">
                        <input type="text" id="commentHuifu" name="commentHuifu" lay-verify="number"
                               autocomplete="off"
                               class="layui-input" value="${houseComment['commentHuifu']}">
                    </div>
                </div>
            </div>
        </form>
        <div class="layui-row wuli-button">
            <button class="layui-btn layui-btn-normal" name="save">保存回复</button>
        </div>
    </div>
</div>

<script>
    layui.use(['layer', 'form', 'laydate', 'jquery','upload'], function () {
        var form = layui.form
            , layer = layui.layer
            , laydate = layui.laydate
            , $ = layui.$
            , upload = layui.upload;

        $("button[name='save']").on('click', function () {
            $.ajax({
                type: "post",
                data: {
                    id: '${houseComment.id}',
                    commentHuifu:$("#commentHuifu").val()
                },
                url: '${allServerPath}web/comment/editHuifu.htmls?t=<%=System.currentTimeMillis()%>',
                success: function (obj) {
                    if (obj.success) {
                        // var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                        // parent.layer.close(index); //再执行关闭
                        layer.msg("保存成功");

                    }
                }
            });
        });
    });
</script>
</body>
</html>
